package com.example.pulseanalyse.veinType;

import java.util.List;

/**
 * @author: yyw
 * time: 2020/12/8 10:51
 * desc:上下文类  策略模式 + 简单工厂模式
 */
public class mutexContext {
    mutexCondition condition;

    public mutexContext(String _pulseType) {
        switch (_pulseType) {
            case "浮":
                condition = new mutexFloating();
                break;
            case "沉":
                condition = new mutexDeep();
                break;
            case "迟":
                condition = new mutexSlow();
                break;
            case "数":
                condition = new mutexRapid();
                break;
            case "滑":
                condition = new mutexSlippery();
                break;
            case "弦":
                condition = new mutexStringy();
                break;
            //case "实":  2020.12.7注释  实脉可以与其他脉型同时出现
            //    condition = new mutexReplete();
            //    break;
            case "平":
                condition = new mutexNormal();
                break;
        }
    }

    public String GetPulseType(List<String> _strList) {
        return condition.GetPulseType(_strList);
    }
}
